PDF malicious file inspecttions steps

Step 1 : Initial Inspection

Step 2: Static Analysis

During static analysis, we will not run the PDF file. Instead, we will systematically examine the document structure, embedded content, JavaScript, and network interactions. This includes:

Step 3: Dynamic Analysis

If required, we can also perform the dynamic analysis in a sandbox environment as we learned in the "Introduction to Malware Analysis" module. This includes opening the PDF file and monitoring the actions it performs on the system.

trid.exe when we don't know about a file type, we can extract some basic information about the sample using trid.exe.

analyze a pdf with peedf.py

 We can use olemeta.py, which is a script to parse OLE files such as MS Office documents (e.g., Word, Excel). This script extracts all standard properties present in the OLE file

 we can use oleid.py to get more information related to the sample. This is a script to analyze OLE files, such as MS Office documents (e.g., Word, Excel), to detect specific characteristics usually found in malicious files (e.g., malware). For example, it can detect VBA macros and embedded Flash objects.

 olevba utility. This script is used to open a MS Office file, detect if it contains VBA macros, and extract and analyze the VBA source code from your own Python applications.

Zipdump has an option to dump all content of the file using the --dumpall parameter. This is really important as we can search through it.

XLMMacroDeobfuscator can be used to decode obfuscated XLM macros (also known as Excel 4.0 macros). It utilizes an internal XLM emulator to interpret the macros, without fully executing the code.

To install the latest development of XLMMacroDeobfuscator, we can use the command below:

Code: python

pip install -U https://github.com/DissectMalware/XLMMacroDeobfuscator/archive/master.zip --force